/*
 * =====================================================================================
 *
 *       Filename:  system.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2015年03月03日 15时13分15秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  jianxi sun (jianxi), ycsunjane@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#ifndef __SYSTEM_H__
#define __SYSTEM_H__
#include <netinet/in.h>
#include "common.h"

struct system_t {
	unsigned char 	mac[ETH_ALEN];
#ifdef CONFIG_AC
	/* ac only */
	struct  sockaddr_in addr;
	char 	acuuid[UUID_LEN];
	uint32_t chaprandom;
#else
	/* ac addr */
	struct  sockaddr_in acaddr;
	char 	*netstatus;
#endif
};

extern struct system_t gconf;
#ifdef CONFIG_AC
void gconf_init(char *nic, char *acaddr, int port);
#else
void gconf_init(char *nic, char *acaddr, int port);
#endif /* CONFIG_AC */
#endif /* __SYSTEM_H__ */
